1. Field of the Invention
The present application relates to a compiler which facilitates wide compilation functions. More particularly, the present application provides an intermediate compiler mechanism embedded in the compiler that performs wide compilation functions without changing program makefiles.
2. Description of the Related Art
Computers users typically use translators to get programs written in high-level programming languages executed by the computer. Translators are typically defined as language processors that accept source code as an input and produce as an output functionally equivalent programs, i.e., object code which can then be linked by a link editor to form executable program code. One example of a commonly used translator is a compiler which translates high-level source code into machine language object code. Early compilers were capable of translating source code from single source files to object code. Compiler vendors are continuously trying to improve execution times of programs using various techniques. One such technique developed is a "wide compile" technique. The advantageous feature of wide compiles is that several program modules presented to the compiler are compiled together. Wide compiles support inline substitutions and argument passing in registers between functions whose source code is in several different modules.
Generally, inline substitution replaces a function call in the source code with the body of the function. This reduces execution times by avoiding the need for argument passing and by permitting other optimizations to be performed across the body of the function that is put inline.
Generally, when wide compiling, if the inliner sees function arguments that are to be passed between functions in different modules, the compiler can generate code that stores those arguments in registers instead of memory. For example, if the inliner sees two arguments to be passed from one function to another, one would be stored in one register and the other argument would be stored in another register. As a result, the time to store and retrieve the arguments is reduced significantly when compared to the storing and retrieving of arguments from memory.
However, many compiler users have apparently decided not to adopt the wide compile technique because current software building processes encompass source files that are spread across many directories. As a result, in order to utilize the wide compile technique, current makefiles, which are often difficult to develop, test and implement, would have to be restructured.
Therefore a need exists for a compiler that performs wide compilations without the need to change or restructure current makefiles.